#include<iostream>
#include<vector>
using namespace std;
bool isnoonyear(int year)
{
	if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
		return true;
	return false;
}
int main()
{
	int data[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
	int year1, month1, day1, year2, month2, day2;
	while (cin >> year1 >> month1 >> day1 >> year2 >> month2 >> day2)
	{
		day1--;
		int ret = 0;
		while (year1 <  year2 || month1 < month2)
		{
			if (isnoonyear(year1))
				data[3] = 29;
			else
				data[3] = 28;
			ret += ((month1 == 2 || month1 == 3 || month1 == 5 || month1 == 7) ? 1 : 2) * (data[month1] - day1);
			day1 = 0;
			++month1;
			if (month1 > 12)
			{
				year1++;
				month1 = 1;
			}
		}
		cout << ret + (day2 - day1) * ((month1 == 2 || month1 == 3 || month1 == 5 || month1 == 7 || month1 == 11) ? 1 : 2) << endl;
	}
	return 0;
}